package com.sw.bbs.board.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sw.bbs.common.constant.BBSConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@ApiModel("评论")
public class Comment {
    @ApiModelProperty("评论id")
    private Integer commentId;

    @ApiModelProperty("评论内容")
    private String content;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = BBSConstant.DATE_FORMAT, timezone= BBSConstant.DATE_TIMEZONE)
    @DateTimeFormat(pattern = BBSConstant.DATE_FORMAT)
    private Date createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = BBSConstant.DATE_FORMAT, timezone= BBSConstant.DATE_TIMEZONE)
    @DateTimeFormat(pattern = BBSConstant.DATE_FORMAT)
    private Date updateTime;

    @ApiModelProperty("评论类型")
    @JsonIgnore
    private Integer type;

    @ApiModelProperty("回复评论id")
    private Integer parentCommentId;

    private Integer likeNum;

    private Integer dislikeNum;

    private Integer fromId;

    private String fromName;

    private String fromAvator;

    private Integer toId;

    private String toName;

    private String toAvator;

    private Integer anonymous;

    private String permission;

    private String otherInfo;

    @ApiModelProperty("解析后内容结构")
    private String resolveInfo;


}